﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    public class EMPeople
    {
        public EMPeople()
        {
            this.Id = Guid.NewGuid();
            this.AddTime = DateTime.Now;
        }
        //数据唯一标识符
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public Guid Id { get; set; }
        //姓
        [Required]
        [StringLength(20)]
        public string? FirstName { get; set; }
        [Required]
        [StringLength(30)]
        //名
        public string? LastName { get; set; }
        //姓名
        //public string? Name { get => this.FirstName + LastName; }
        //居住地址
        [Required]
        [StringLength(150)]
        public string? Address { get; set; }
        //是否在外务工
        [Required]
        public bool IsOut { get; set; }
        //年龄
        [Required]
        public int Age { get; set; }
        //性别 
        [Required]
        public bool Gender { get; set; }
        //标记_空巢老人
        public bool lable_empty { get; set; }
        //标记_贫困人口
        public bool lable_poverty { get; set; }
        //标记_慢性病人口
        public bool lable_chronic { get; set; }
        //出生日期
        [Required]
        public DateTime BirthDate { get; set; }
        //18位身份证号码
        [Required]
        [StringLength(20)]
        public string? IDNumber { get; set; }
        //注册时间
        [Required]
        public DateTime AddTime { get; set; }
    }
}
